STEP 10: Let's add the value of our two rolls together to get a total.

We'll use a variable named total_roll to store the sum, or total, of our two rolls.

  • In LOGIC, go to and drag Integer Variable to the bottom of your program.
  • Change the variable name to total_roll. Remember, the variable name is the word before the equals sign =.
  • Change the value to roll_1 + roll_2.


To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)